package grape.auth.service.clientdetails.po;

import grape.common.service.po.NormalBasePo;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 服务客户端表
 * </p>
 *
 * @author yangwei
 * @since 2020-03-31
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("oauth_client_details")
public class OauthClientDetails extends NormalBasePo<OauthClientDetails> {

    private static final long serialVersionUID = 1L;

    /**
     * 客户端id,app_id
     */
    private String clientId;

    /**
     * 资源权限
     */
    private String resourceIds;

    /**
     * 客户端密码,app_secret
     */
    private String clientSecret;

    /**
     * 授权范围
     */
    private String scope;

    /**
     * 授权类型
     */
    private String authorizedGrantTypes;

    /**
     * 重定向url
     */
    private String webServerRedirectUri;

    /**
     * 权限信息
     */
    private String authorities;

    /**
     * token有效时长，单位秒
     */
    private Integer accessTokenValidity;

    /**
     * 刷新token有效时间，单位秒
     */
    private Integer refreshTokenValidity;

    /**
     * 额外信息
     */
    private String additionalInformation;

    /**
     * 自动授权
     */
    private Boolean autoapprove;


    @Override
    protected Serializable pkVal() {
        return null;
    }

}
